
#include "slepbase.h"

void experiment_mult(){
	slep_matrix *A;
	slep_vector *y,*ATy;

	A = slepAllocDenseMatrix(7,9);
	y = slepAllocDenseVector(7);
	ATy = slepAllocDenseVector(9);

	slep_randn(y->data.vctr,7,0.0,1.0);
	slep_randn(A->data.mtrx,7*9,0.0,1.0);

	slep_daAxpby(SlepTranspose, 1.0, A,y,0.0,ATy);

	slepVerbConsoleWrDMat(A);
	slepVerbConsoleWrDVec(y);
	slepVerbConsoleWrDVec(ATy);
}


void experiment_mult2(){
	slep_matrix *A;
	slep_vector *y,*ATy;

	A = slepAllocDenseMatrix(1,1);
	y = slepAllocDenseVector(1);
	ATy = slepAllocDenseVector(1);

	slep_randn(y->data.vctr,1,0.0,1.0);
	slep_randn(A->data.mtrx,1,0.0,1.0);

	slep_daAxpby(SlepTranspose, 1.0, A,y,0.0,ATy);

	slepVerbConsoleWrDMat(A);
	slepVerbConsoleWrDVec(y);
	slepVerbConsoleWrDVec(ATy);
}